<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form action="<?php echo url_for('plant/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
  <table>
    <tfoot>
      <tr>
        <td colspan="2">
           <?php echo $form->renderHiddenFields(false) ?>
          <input type="submit" value="Save" />
        </td>
      </tr>
    </tfoot>
    <tbody>
        <?php echo $form->renderGlobalErrors() ?>
      <tr>
        <th><?php echo $form['name']->renderLabel() ?></th>
        <td>
          <?php echo $form['name']->renderError() ?>
          <?php echo $form['name'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['owner']->renderLabel() ?></th>
        <td>
          <?php echo $form['owner']->renderError() ?>
          <?php echo $form['owner'] ?>
        </td>
        <td class="formHelp">
            <?php echo $form['owner']->renderHelp()?>
            <?php echo link_to('New Client','client/new',array('popup'=>array('window','width=900,height=800,left=300,top=50,location=no,scrollbars =yes,resizable=yes,directories=no,status=no,toolbar=no,menub ar=no')))?>
            <?php echo "and then reload the page"?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['country']->renderLabel() ?></th>
        <td>
          <?php echo $form['country']->renderError() ?>
          <?php echo $form['country'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['city']->renderLabel() ?></th>
        <td>
          <?php echo $form['city']->renderError() ?>
          <?php echo $form['city'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['location']->renderLabel() ?></th>
        <td>
          <?php echo $form['location']->renderError() ?>
          <?php echo $form['location'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['coordinates']->renderLabel() ?></th>
        <td>
          <?php echo $form['coordinates']->renderError() ?>
          <?php echo $form['coordinates'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['pm']->renderLabel() ?></th>
        <td>
          <?php echo $form['pm']->renderError() ?>
          <?php echo $form['pm'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['path']->renderLabel() ?></th>
        <td>
          <?php echo $form['path']->renderError() ?>
          <?php echo $form['path'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['enable']->renderLabel() ?></th>
        <td>
          <?php echo $form['enable']->renderError() ?>
          <?php echo $form['enable'] ?>
        </td>
        <td class="formHelp">
            <?php echo $form['enable']->renderHelp()?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['pn']->renderLabel() ?></th>
        <td>
          <?php echo $form['pn']->renderError() ?>
          <?php echo $form['pn'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['type']->renderLabel() ?></th>
        <td>
          <?php echo $form['type']->renderError() ?>
          <?php echo $form['type'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['structure']->renderLabel() ?></th>
        <td>
          <?php echo $form['structure']->renderError() ?>
          <?php echo $form['structure'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['est_rad']->renderLabel() ?></th>
        <td>
          <?php echo $form['est_rad']->renderError() ?>
          <?php echo $form['est_rad'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['area']->renderLabel() ?></th>
        <td>
          <?php echo $form['area']->renderError() ?>
          <?php echo $form['area'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['perimeter']->renderLabel() ?></th>
        <td>
          <?php echo $form['perimeter']->renderError() ?>
          <?php echo $form['perimeter'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['tilt']->renderLabel() ?></th>
        <td>
          <?php echo $form['tilt']->renderError() ?>
          <?php echo $form['tilt'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['code']->renderLabel() ?></th>
        <td>
          <?php echo $form['code']->renderError() ?>
          <?php echo $form['code'] ?>
        </td>
      </tr>
    
      <tr>
        <th><?php echo $form['internet']->renderLabel() ?></th>
        <td>
          <?php echo $form['internet']->renderError() ?>
          <?php echo $form['internet'] ?>
        </td>
      </tr>
    </tbody>
  </table>
</form>
